package noStaticFactory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import staticFactory.Student;

public class Test {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        staticFactory.Student stu = (Student) applicationContext.getBean("stuFactory2");
        System.out.println( "stu学生对象的信息: " + stu.toString());
    }
}
